(function(){
    var obj={};
    obj.ajax=function(type,url,data,headers,context,callback){
        $.ajax({type:type,url:url,data:JSON.stringify(data),headers:headers,context:context})
            .done(callback);
    };
    window.j=obj;
})();

(function () {
    var dateForamt = {};
    dateForamt.dateFormat = function dateFormat(time) {
        var date = new Date(time);
        var month = date.getMonth() + 1;
        if (date.getMonth() + 1 < 10) {
            var month = "0" + (date.getMonth() + 1);
        }
        var da = date.getDate();
        if (date.getDate() < 10) {
            var da = "0" + date.getDate();
        }
        return date.getFullYear() + "-" + month + "-" + da;
    }
    window.format = dateForamt;
})();
